package com.ruoyi.activityShareLog.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.activityShareLog.mapper.ActivityShareLogMapper;
import com.ruoyi.activityShareLog.domain.ActivityShareLog;
import com.ruoyi.activityShareLog.service.IActivityShareLogService;

/**
 * 活动分享记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-14
 */
@Service
public class ActivityShareLogServiceImpl implements IActivityShareLogService 
{
    @Autowired
    private ActivityShareLogMapper activityShareLogMapper;

    /**
     * 查询活动分享记录
     * 
     * @param id 活动分享记录主键
     * @return 活动分享记录
     */
    @Override
    public ActivityShareLog selectActivityShareLogById(Long id)
    {
        return activityShareLogMapper.selectActivityShareLogById(id);
    }

    /**
     * 查询活动分享记录列表
     * 
     * @param activityShareLog 活动分享记录
     * @return 活动分享记录
     */
    @Override
    public List<ActivityShareLog> selectActivityShareLogList(ActivityShareLog activityShareLog)
    {
        return activityShareLogMapper.selectActivityShareLogList(activityShareLog);
    }

    /**
     * 新增活动分享记录
     * 
     * @param activityShareLog 活动分享记录
     * @return 结果
     */
    @Override
    public int insertActivityShareLog(ActivityShareLog activityShareLog)
    {
        activityShareLog.setCreateTime(DateUtils.getNowDate());
        return activityShareLogMapper.insertActivityShareLog(activityShareLog);
    }

    /**
     * 修改活动分享记录
     * 
     * @param activityShareLog 活动分享记录
     * @return 结果
     */
    @Override
    public int updateActivityShareLog(ActivityShareLog activityShareLog)
    {
        activityShareLog.setUpdateTime(DateUtils.getNowDate());
        return activityShareLogMapper.updateActivityShareLog(activityShareLog);
    }

    /**
     * 批量删除活动分享记录
     * 
     * @param ids 需要删除的活动分享记录主键
     * @return 结果
     */
    @Override
    public int deleteActivityShareLogByIds(Long[] ids)
    {
        return activityShareLogMapper.deleteActivityShareLogByIds(ids);
    }

    /**
     * 删除活动分享记录信息
     * 
     * @param id 活动分享记录主键
     * @return 结果
     */
    @Override
    public int deleteActivityShareLogById(Long id)
    {
        return activityShareLogMapper.deleteActivityShareLogById(id);
    }
}
